<?php
    header('Access-Control-Allow-Origin:*');
    header("content-type:text/html;charset=utf-8");
    if($_POST){
        $db_con = mysqli_connect('localhost','root','');
        $result = mysqli_query($db_con,'set names utf8');
        $result = mysqli_query($db_con,'use sx_control');
        // print_r ($_POST['delete_arr']);

        for($i=0;$i<count($_POST['delete_arr']);$i++){
            $del_id = $_POST['delete_arr'][$i];
            print_r ($del_id);
            $sql = "delete from project where id=$del_id";
            $result = mysqli_query($db_con,$sql);
        }
        mysqli_close($db_con);
    }
?>
